[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
else Optional Clause in an IF/THEN or CASE Statement
if <bool exp> then { IF/THEN }
<statement>
else
<statement>;
case <exp> of { CASE }
<clist> : <statement>;
...
<clist> : <statement>
else <statement>
end;
In an IF/THEN/ELSE statement, the ELSE statement is executed if <bool
exp> is FALSE. In a CASE statement, the ELSE statement is executed if
<exp> doesn't match any of the <clist> values. If you want ELSE to
have more than one statement, you must use a compound statement, as
shown below:
else begin
<statement>;
<statement>;
...;
<statement>
end;
In both IF/THEN and CASE statements, the ELSE statement is optional.
<bool exp> Any Boolean expression.
<statement> Any legal statement, including a compound statement.
<exp> Any ordinal expression.
<clist> Any list of ordinal values.
See Also:
if
then
case
begin
end
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson